package com.seu.githubcn.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.List;

@TableName("user")
@Data
public class User {

    @TableId(type = IdType.AUTO)
    private Integer userId;
    private String userName;
    private String userPassword;
    private String userProfileUrl;
    private String salt;
    private Permission userPermission;
    private String description;

    @TableField(exist = false)
    private List<Repo> repoList;

    public enum Permission {
        ADMIN,
        AVERAGE,
        BANNED
    }
}


